package factory.simplefactory;

public class OrderPizza2 {
    public void orderPizza(String type) {
        Pizza pizza = SimpleFactory.createPizza2(type);
        if (pizza != null) {
            pizza.prepare();
            pizza.bake();
            pizza.cut();
            pizza.box();
            System.out.println("----------");
        } else {
            System.out.println("无法订购" + type + "披萨");
        }
    }
}
